libmystdio.so:mystdio.o mystring.o
	gcc -o $@ $^ -shared
%.o:%.c
	gcc -fPIC -c $<

.PHONY:clean
clean:
	@rm -rf *.so *.o stdc*

.PHONY:output
output:
	@mkdir -p stdc/include
	@mkdir -p stdc/lib
	@cp -f *.h stdc/include
	@cp -f *.so stdc/lib
	@tar -czf stdc.tgz stdc





#libmystdio.a:mystdio.o mystring.o
#	@ar -rc $@ $^
#%.o:%.c
#	@gcc -c $<
#
#.PHONY:clean
#clean: 
#	@rm -rf *.a *.o stdc*
#
#.PHONY:output
#output:
#	@mkdir -p stdc/include
#	@mkdir -p stdc/lib
#	@cp -f *.h stdc/include
#	@cp -f *.a stdc/lib
#	@tar -czf stdc.tgz stdc
